// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_QU
// * CreateDate    : 2014-06-05 18:30:37
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:37
// * LastChanger   : 2014-06-05 18:30:37
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SalesQuEntity : EntityBase
    {
        public SalesQuTable TableSchema
        {
            get
            {
                return SalesQuTable.Current;
            }
		}
		
		public SalesQuEntity()
        {

        }
		
		public SalesQuEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.ContactUser = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_USER"]));
			this.ContactTel = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_TEL"]));
			this.QuoteNo = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_NO"]));
			this.QuoteUser = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_USER"]));
			this.QuoteDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_DATE"]));
			this.DeliveryCycle = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_CYCLE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.TransportFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRANSPORT_FEE"]));
			this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
			this.PackageFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["PACKAGE_FEE"]));
			this.ExpiryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRY_DATE"]));
			this.ExpiryDateTo = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRY_DATE_TO"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public SalesQuEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.ContactId = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_ID"]));
			this.ContactUser = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_USER"]));
			this.ContactTel = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_TEL"]));
			this.QuoteNo = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_NO"]));
			this.QuoteUser = Convert.ToString(CommonFunctions.ToObject(dr["QUOTE_USER"]));
			this.QuoteDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["QUOTE_DATE"]));
			this.DeliveryCycle = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_CYCLE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.TransportType = Convert.ToString(CommonFunctions.ToObject(dr["TRANSPORT_TYPE"]));
			this.TransportFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRANSPORT_FEE"]));
			this.PackageType = Convert.ToString(CommonFunctions.ToObject(dr["PACKAGE_TYPE"]));
			this.PackageFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["PACKAGE_FEE"]));
			this.ExpiryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRY_DATE"]));
			this.ExpiryDateTo = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRY_DATE_TO"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesQuTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_ID)); }
            set { SetData(SalesQuTable.C_ID, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesQuTable.C_CREATED_DATE)); }
            set { SetData(SalesQuTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CREATED_BY)); }
            set { SetData(SalesQuTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesQuTable.C_UPDATED_DATE)); }
            set { SetData(SalesQuTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_UPDATED_BY)); }
            set { SetData(SalesQuTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SalesQuTable.C_IS_ACTIVE)); }
            set { SetData(SalesQuTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CUSTOMER_ID)); }
            set { SetData(SalesQuTable.C_CUSTOMER_ID, value); }
        }
		
        [DataMember]
        public string CustomerName
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CUSTOMER_NAME)); }
            set { SetData(SalesQuTable.C_CUSTOMER_NAME, value); }
        }
		
        [DataMember]
        public string ContactId
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CONTACT_ID)); }
            set { SetData(SalesQuTable.C_CONTACT_ID, value); }
        }
		
        [DataMember]
        public string ContactUser
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CONTACT_USER)); }
            set { SetData(SalesQuTable.C_CONTACT_USER, value); }
        }
		
        [DataMember]
        public string ContactTel
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CONTACT_TEL)); }
            set { SetData(SalesQuTable.C_CONTACT_TEL, value); }
        }
		
        [DataMember]
        public string QuoteNo
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_QUOTE_NO)); }
            set { SetData(SalesQuTable.C_QUOTE_NO, value); }
        }
		
        [DataMember]
        public string QuoteUser
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_QUOTE_USER)); }
            set { SetData(SalesQuTable.C_QUOTE_USER, value); }
        }
		
        [DataMember]
        public DateTime QuoteDate
        {
            get { return Convert.ToDateTime(GetData(SalesQuTable.C_QUOTE_DATE)); }
            set { SetData(SalesQuTable.C_QUOTE_DATE, value); }
        }
		
        [DataMember]
        public string DeliveryCycle
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_DELIVERY_CYCLE)); }
            set { SetData(SalesQuTable.C_DELIVERY_CYCLE, value); }
        }
		
        [DataMember]
        public decimal TotalAmount
        {
            get { return Convert.ToDecimal(GetData(SalesQuTable.C_TOTAL_AMOUNT)); }
            set { SetData(SalesQuTable.C_TOTAL_AMOUNT, value); }
        }
		
        [DataMember]
        public string Currency
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_CURRENCY)); }
            set { SetData(SalesQuTable.C_CURRENCY, value); }
        }
		
        [DataMember]
        public string TransportType
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_TRANSPORT_TYPE)); }
            set { SetData(SalesQuTable.C_TRANSPORT_TYPE, value); }
        }
		
        [DataMember]
        public decimal TransportFee
        {
            get { return Convert.ToDecimal(GetData(SalesQuTable.C_TRANSPORT_FEE)); }
            set { SetData(SalesQuTable.C_TRANSPORT_FEE, value); }
        }
		
        [DataMember]
        public string PackageType
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_PACKAGE_TYPE)); }
            set { SetData(SalesQuTable.C_PACKAGE_TYPE, value); }
        }
		
        [DataMember]
        public decimal PackageFee
        {
            get { return Convert.ToDecimal(GetData(SalesQuTable.C_PACKAGE_FEE)); }
            set { SetData(SalesQuTable.C_PACKAGE_FEE, value); }
        }
		
        [DataMember]
        public DateTime ExpiryDate
        {
            get { return Convert.ToDateTime(GetData(SalesQuTable.C_EXPIRY_DATE)); }
            set { SetData(SalesQuTable.C_EXPIRY_DATE, value); }
        }
		
        [DataMember]
        public DateTime ExpiryDateTo
        {
            get { return Convert.ToDateTime(GetData(SalesQuTable.C_EXPIRY_DATE_TO)); }
            set { SetData(SalesQuTable.C_EXPIRY_DATE_TO, value); }
        }
		
        [DataMember]
        public string PaymentType
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_PAYMENT_TYPE)); }
            set { SetData(SalesQuTable.C_PAYMENT_TYPE, value); }
        }
		
        [DataMember]
        public int IsTax
        {
            get { return Convert.ToInt32(GetData(SalesQuTable.C_IS_TAX)); }
            set { SetData(SalesQuTable.C_IS_TAX, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_STATUS)); }
            set { SetData(SalesQuTable.C_STATUS, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(SalesQuTable.C_REMARK)); }
            set { SetData(SalesQuTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

